﻿package com.toncen.samepms.portal.action;

import java.util.Date;

import com.toncen.samepms.common.AbstractDatabaseAction;
import com.toncen.samepms.net.dao.SuggestionDao;
import com.toncen.samepms.net.domain.Suggestion;

/**
 * 描述：意见反馈表NET_SUGGESTION的action文件
 * 
 * @author tch
 * 
 */
public class SuggestionPublicAction extends AbstractDatabaseAction<Suggestion, SuggestionDao> {
	/**
	 * 序列号
	 */
	private static final long serialVersionUID = 1370398878067L;

	public SuggestionPublicAction() throws Exception {
		super();
	}

	public String onDoSuggest() {
		return SUCCESS;
	}

	public String onDoUpSuggest() throws Exception {
		validateVerification();
		Suggestion suggestion = (Suggestion) getDomain();
		suggestion.setCreatedate(new Date());
		suggestion.setState(2);// 否
		save(suggestion);
		return SUCCESS;
	}
}
